package com.otp.service.instance.impl;

import java.util.List;

import org.appfuse.service.impl.GenericManagerImpl;
import org.springframework.beans.factory.annotation.Autowired;

import com.otp.model.test.instance.dao.ItemDao;
import com.otp.model.test.template.Item;
import com.otp.service.instance.ItemManager;

public class ItemManagerImpl extends GenericManagerImpl<Item,Long> implements ItemManager{
	private ItemDao mapItemDao;
	
	@Autowired
	public void setItemDao(ItemDao mapItemDao){
		this.dao = mapItemDao;
        this.mapItemDao = mapItemDao;
	}

	public List<Item> getTestMapEntryByTemplate(String templateId) {
		try {
			List<Item> result = mapItemDao.getTestMapEntryByTemplate(templateId);
			return result;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

	public List<Item> getTestMapEntryBySection(String sectionId) {
		try {
			return mapItemDao.getTestMapEntryBySection(sectionId);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
	
}
